<script setup lang='ts'>
import {PropType, reactive, computed} from 'vue'
import {HeaderData} from '@/components/dTable/dTable'
const props = defineProps({
  row:{
    type:Object as PropType<any>,
    required:true
  },
  col:{
    type:Object as PropType<HeaderData>,
    required:true
  }
})

//找到按钮数据
const operationArr = computed<string>(() => {
  const row = reactive(props.row)
  console.log('图片', row.cover)

  return row.cover
})
const url = 'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg'
const emits = defineEmits(['clickIt'])
//点击事件
const onClick = () => {
  emits('clickIt', operationArr)
}
// console.log('operationArr', operationArr)

</script>

<template>
  <div :style="{display:'flex'}" @click="onClick()">
    <div v-if="operationArr">
      <el-image
        style="width: 100px; height: 100px"
        :src="operationArr"
        :zoom-rate="1.2"
        :initial-index="4"
        fit="cover"
      />
    <!-- <img :src="operationArr" alt="" width="100px" height="100px"> -->
    <!-- <span>{{ operationArr }}</span> -->
    </div>
  </div>
</template>

<style scoped>
</style>